<table class="table table-bordered text-center">
    <thead>
    </thead>
    <tbody>
    <tr>
        <td>订单编号</td>
        <td>下单日期</td>
        <td>收货人</td>
        <td>联系电话</td>
        <td>支付时间</td>
        <td>订单总价</td>
        <td>操作</td>
    </tr>
    {foreach name="orderList" item="item"}
        <tr>
            <td>{$item.order_sn}</td>
            <td>{$item['add_time']|date="Y-m-d H:i",###}</td>
            <td>{$item.consignee}</td>
            <td>{$item.mobile}</td>
            <td>{$item['pay_time']|date="Y-m-d H:i",###}</td>
            <td>{$item.total_amount}</td>
            <td>
                {if condition="$item['shipping_status'] eq 1 or $item['shipping_status'] eq 2"}
                    <a href="{:U('Order/deliveryInfo',['order_id'=>$item['order_id']])}" class="btn btn-success btn-xs" type="button">查看</a>
                    {else/}
                    <a href="{:U('Order/deliveryInfo',['order_id'=>$item['order_id']])}" class="btn btn-primary btn-xs" type="button">去发货</a>
                {/if}
            </td>
        </tr>
    {/foreach}
    </tbody>
</table>
<div class="row page">
    <div class="col-sm-12 text-center">
        {$page}
    </div>
</div>
<script>
    $('.page a').click(function(){
        var p = $(this).data('p');
        if(!p){
            return;
        }
        ajax_index(p);
    })
</script>